(tar-extract): Pay attention to the value of
authorEli Zaretskii <eliz@gnu.org>
Wed, 9 May 2001 15:34:53 +0000 (15:34 +0000)
committerEli Zaretskii <eliz@gnu.org>
Wed, 9 May 2001 15:34:53 +0000 (15:34 +0000)
coding-system-for-read, if it is non-nil.

lisp/tar-mode.el

index 264bc37f2e62d37509823bf4f97519cd45921cff..fac148b2b63e736cae9d02e06391e76d8b9337f4 100644 (file)
@@ -716,10 +716,11 @@ appear on disk when you save the tar-file's buffer."
                ;; We need to mimic the parts of insert-file-contents
                ;; which determine the coding-system and decode the text.
                (let ((coding
-                      (and set-auto-coding-function
-                           (save-excursion
-                             (funcall set-auto-coding-function
-                                      name (- (point-max) (point))))))
+                      (or coding-system-for-read
+                          (and set-auto-coding-function
+                               (save-excursion
+                                 (funcall set-auto-coding-function
+                                          name (- (point-max) (point)))))))
                      (multibyte enable-multibyte-characters)
                      (detected (detect-coding-region
                                 1 (min 16384 (point-max)) t)))